import { callback } from "../common/report.js"
/*数据上报 毛细亚*/
export default {
   

    pageIn(id,pageId) { //进入页面的事件上报
        
        let options = {
            lenovoId:id,
            pageId:pageId,//101 
            inOut: "01",
            reportType: "page",
        }
        
        this.callback(options)
    },

    pageOut(id,startTime,pageId) { // 离开页面的事件上报
        //页面关闭上报停留时间
        const shutdownTime = +new Date();
        const stopTime = shutdownTime - startTime;
        const options = {
            reportType: 'page',
            stopTime: `${stopTime}`,
            pageId:pageId, // 101
            inOut: '02',
            lenovoId:id,

        };
        this.callback(options)
    },

    pageLoginIn(id){// 登录事件
        let options={
            reportType:"event",
            eventId:"008",
            eventDes:"联想页游登录事件",
            lenovoId:id,
        }
          this.callback(options)
    },

     pageLoginOut(id){// 退出事件
       let options={
            reportType:"event",
            eventId:"024",
            eventDes:"联想页游退出事件",
            lenovoId:id,
        }
          this.callback(options)
    },
    pageSearch(id){// 搜索事件
       let options={
            reportType:"event",
            eventId:"001",
            eventDes:"联想页游搜索事件",
            lenovoId:id,
        }
          this.callback(options)
    },
    pageClick(id){//点击事件
       let options={
            reportType:"event",
            eventId:"024",
            eventDes:"联想页游点击事件",
            lenovoId:id,
        }
          this.callback(options)
    },

    pageStartGame(id){// 开始游戏
       let options={
            reportType:"event",
            eventId:"002",
            eventDes:"联想页游开始游戏",
            lenovoId:id,
        }
          this.callback(options)
    },

    pageSelect(id){// 分类事件
        let options={
            reportType:"event",
            eventId:"005",
            eventDes:"联想页游分类事件",
            lenovoId:id,
        }
          this.callback(options)
    },

    pageMoreGame(id){// 更多事件
        let options={
            reportType:"event",
            eventId:"004",
            eventDes:"联想页游更多事件",
          
            lenovoId:id,
        }
          this.callback(options)
    },
    
  callback(options){
        // console.log(options)
       callback(options)  //获取机型并上报
    }

}
